package com.longg.service;

import com.longg.model.User;

import java.util.List;
import java.util.Map;

public interface IUserService {
    User findByName(String username);

    List<User> findByEmail(String email);

    List<User> findByEmailOrName(String email, String username);

    boolean addUser(User user);

    String sendCode(String email);

    boolean resetPassword(User user);

    Map<String, Object> getUserBaseInfo(String username);

    Map<String, Object> getUserInfo(String id);

    /**
     * 修改用户信息中的是否私密
     * @param id 用户id
     * @param secret 是否私密 0不私密 1私密
     * @return
     */
    boolean updateInfo(int id, String secret,String deptName);

    /**
     *按照页数查找当前页的所有用户数据
     * @param page 当前页
     * @return
     */
    List<Map<String,Object>> findUsersByPage(int page,int id,String name);
}
